summary {

  &::-webkit-details-marker {
    display: none !important;
  }

  &::marker {
    display: none !important;
  }

  &::marker {
    content: "";
  }
}

@layer components {

  .search {
    --gap: 4vmin;
    --width: 80ch;

    display: flex;
    flex-direction: column;
    gap: var(--gap);
    margin-inline: auto;
    max-block-size: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--block-space) calc(var(--block-space-double) + var(--btn-size));
  }

  /* Form
  /* ------------------------------------------------------------------------ */

  .search__input {
    --clear-icon-size: 1em;
    --focus-ring-size: 0;
    --input-border-color: var(--color-ink-light);
    --input-border-radius: 0;
    --input-padding: 0.1em;

    border-width: 0 0 1px;
    max-inline-size: 50ch;
    position: relative;

    &::-webkit-search-cancel-button {
      display: none;
    }
  }

  .search__reset {
    --btn-background: var(--color-terminal-bg);
    --btn-size: 1.5lh;
  }


  /* Content
  /* ------------------------------------------------------------------------ */

  .search__list {
    display: grid;
    gap: var(--block-space);
    list-style: none;
    margin: 0 auto;
    max-inline-size: min(80ch, 100%);
    padding: 0;
    text-align: start;
  }

  .search__empty {
    margin-block: 3em;
    opacity: 0.66;
    text-align: center;
  }

  .search__excerpt {
    color: var(--color-ink);
    font-size: var(--text-small);
  }

  .search__excerpt--comment {
    --avatar-size: var(--comment-avatar-size);
    --comment-avatar-size: 32px;
    --padding: 1ch;

    align-items: center;
    background-color: var(--color-ink-lightest);
    border-radius: 1ch;
    display: flex;
    gap: 1ch;
    margin-inline-start: calc(var(--comment-avatar-size) / 2);
    padding-block: 0.5ch;

    .avatar {
      margin-inline-start: calc(-0.5 * var(--comment-avatar-size));
    }
  }

  .search__result {
    color: var(--color-link);

    &:not(&:hover) {
      box-shadow: 0 0 0 1px var(--color-ink-lighter);
    }
  }

  .search__title {
    text-decoration: underline;
  }
}
